"use strict";

var path = require("path");
var gulp = require("gulp");

var source = path.join(__dirname, "..", "..", "src", "assets", "images", "*--prod.svg");
var build = path.join(__dirname, "..", "..", "prod", "images");

/**
 * Copy and compress svg
 *
 * @method prod:svg
 */
function svg() {
  let plugins = this.opts.plugins;
  return gulp.src(source)
    .pipe(plugins.svgmin())
    .pipe(gulp.dest(build));
}

module.exports = svg;
